import VueRouter from "vue-router";
import Vue from "vue";
import About from "../pages/About.vue";
import Home from "../pages/Home.vue";
import News from "../pages/News.vue";
import Message from "../pages/Message.vue";
import Detail from "../pages/Detail.vue";
Vue.use(VueRouter);
export default new VueRouter({
  routes: [
    {
      path: "/",
      redirect: "/about",
    },
    {
      path: "/about",
      component: About,
    },
    {
      path: "/home",
      component: Home,
      children:[
        {
            path:"news",
            component:News
        },
        {
            path:"message",
            component:Message,
            children:[{
                path:"detail",
                component:Detail
            }
                
            ]
        }
      ]
    },
  ],
});
